using Common;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AnesSystem.Models
{
    public class DrugSpeedModel : ObservableObject
    {
        private string speed;
        private DateTime beginTime;
        private string unit = "ml/h";
        private string actions= Constants.ACTION_WORK;
        private string drugFullName;

        public string Speed
        {
            get
            {
                return speed;
            }

            set
            {
                speed = value;
                RaisePropertyChanged("Speed");
            }
        }
        [BsonDateTimeOptions(Kind = DateTimeKind.Local)]
        public DateTime BeginTime
        {
            get
            {
                if (beginTime.Year < 1970)
                {
                    beginTime = DateTime.Now;
                }
                return beginTime;
            }

            set
            {
                beginTime = value;
                RaisePropertyChanged("BeginTime");
            }
        }
        public string Unit
        {
            get
            {
                return unit;
            }

            set
            {
                unit = value;
                RaisePropertyChanged("Unit");
            }
        }
        public string Actions
        {
            get
            {
                return actions;
            }

            set
            {
                actions = value;
                RaisePropertyChanged("Actions");
            }
        }

        public string DrugFullName
        {
            get
            {
                return drugFullName;
            }

            set
            {
                drugFullName = value;
                RaisePropertyChanged("DrugFullName");
            }
        }
    }
}